var url = {
	// 是否是本地
	isLocal: false,
	// 是否是正式
	isFormal: true, // isLocal:false 时才有效

	// 本地测试地址 
	localTest: 'https://192.168.161.27:8088/epointwechat/rest/wechatserver/',
	// 本地登录测试地址 
	localTest_login: 'https://192.168.161.27:8088/epointwechat/',

	// 测试服务器地址 
	serverTest: 'https://121.224.59.80:8099/epointwechat/rest/wechatserver/',
	// 测试服务器登录地址 
	serverTest_login: 'https://121.224.59.80:8099/epointwechat/',

	// 正式服务器接口地址
	serverFormal: '',
	// 正式服务器登录接口
	serverFormal_login: '',

	// 登录
	login: 'https://poms-rest.xianrenn.com/hmc-poms/worker/login',
	// 主页数据总览
	mainData: 'https://poms-rest.xianrenn.com/hmc-poms/worker/getOverViewData',
	// 工人订单列表查询
	orderList: 'https://poms-rest.xianrenn.com/hmc-poms/order/listOrderForWorker',
	// 工人复尺详情查询
	measureDetail: 'https://poms-rest.xianrenn.com/hmc-poms/order/getworkerOrderDetailInfo/',
	// 更新产品测量值
	updateProduct: 'https://poms-rest.xianrenn.com/hmc-poms/order/updateProductMeasureValues',
	
	// 安装详情
	installDetail: 'https://poms-rest.xianrenn.com/hmc-poms/order/getOrderInstallDetailInfo/',
	// 安装更新
	installUpdate: 'https://poms-rest.xianrenn.com/hmc-poms/order/checkWorkerInstall',
	
	//上传
	uploadImg: 'https://poms-rest.xianrenn.com/hmc-poms/uploadRestApi/upls'
};

// 判断是否是本地
if (url.isLocal == true) {
	//serverUrl = url.localTest;
	var loginUrl = url.localTest_login;
} else {
	//serverUrl = url.isFormal ? url.serverFormal : url.serverTest;
	//loginUrl = url.isFormal ? url.serverFormal_login : url.serverTest_login;

	var loginUrl = url.isFormal ? url.login : url.serverTest_login;
	var mainDataUrl = url.isFormal ? url.mainData : url.serverTest_login;
	var orderListUrl = url.isFormal ? url.orderList : url.serverTest_login;
	var updateProductUrl = url.isFormal ? url.updateProduct : url.serverTest_login;
	var measureDetailUrl = url.isFormal ? url.measureDetail : url.serverTest_login;
	
	var installDetailUrl = url.isFormal ? url.installDetail : url.serverTest_login;
	var installUpdatelUrl = url.isFormal ? url.installUpdate : url.serverTest_login;

	var uploadImgUrl = url.isFormal ? url.uploadImg : url.serverTest_login;
};
module.exports = {
	//serverUrl: serverUrl,

	loginUrl: loginUrl,
	mainDataUrl: mainDataUrl,
	orderListUrl: orderListUrl,
	updateProductUrl: updateProductUrl,
	measureDetailUrl: measureDetailUrl,
	
	installDetailUrl: installDetailUrl,
	installUpdatelUrl: installUpdatelUrl,
	
	uploadImgUrl: uploadImgUrl,
};
